package com.vhall.component.plugin.common.enums;

import lombok.Getter;

/**
 * @author yongzheng.xu
 * @date 2021/4/24 22:09
 */
@Getter
public enum UserSex {

    /**
     * 女
     */
    W(0, "女"),
    M(1, "男");

    private final int code;
    private final String msg;

    UserSex(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static UserSex getValue(int code) {
        for (UserSex co : values()) {
            if (co.getCode() == code) {
                return co;
            }
        }
        return null;
    }
}
